package vow.gui.models;

import java.util.List;

import javax.swing.AbstractListModel;

import econtract.simple.Contract;
import econtract.util.ContractRepository;

public class ContractListModel extends AbstractListModel{

	List<Contract> values;
	
	public ContractListModel(ContractRepository repo){
		values = repo.getContracts();
	}
	
	@Override
	public Object getElementAt(int index) {
		return values.get(index);
	}

	@Override
	public int getSize() {
		return values.size();
	}
	
}